{% extends "common/layout_main.html" %}
{% block content %}
    <div class="form-group">
    <div class="form-horizontal m-t m-b">
    <div class="row">
        <div class="col-lg-12">
            <a class="btn btn-w-m btn-outline btn-primary pull-right"
               href="{{ buildUrl('/switch/set') }}">
                <i class="fa fa-plus"></i>账号
            </a>
        </div>
    </div>
    <hr>
    <div class="row">
        <div class="col-lg-12">
            <form class="form-inline wrap_search">
                <table class="table table-bordered m-t">
                    <thead>
                    <tr>
                        <th>选择</th>
                        <th>IP</th>
                        <th>类型</th>
                        <th>扫描状态</th>
                        <th>更新时间</th>
                        <th>备注</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    {% if info %}
                        {% for item in info %}
                            <tr>
                                <td>
                                    <ul id="list"><input type="checkbox" name="selectFlag" value="{{ item.id }}"></ul>
                                </td>
                                <td>{{ item.ipaddr }}</td>
                                <td>{{ item.iscore_desc }}</td>
                                <td>{{ item.status_desc }}</td>
                                <td>{{ item.update_time }}</td>
                                <td>{{ item.note }}</td>
                                <td>
                                    <a href="{{ buildUrl('/switch/info') }}?id={{ item.id }}">
                                        <i class="fa fa-eye fa-lg"></i>
                                    </a>
                                    <a class="m-l" href="{{ buildUrl('/switch/set') }}?id={{ item.id }}">
                                        <i class="fa fa-edit fa-lg"></i>
                                    </a>

                                    <a class="m-l remove" href="javascript:void(0);" data="{{ item.id }}">
                                        <i class="fa fa-trash fa-lg"></i>
                                    </a>
                                </td>
                            </tr>
                        {% endfor %}
                        <tr>
                            <td>
                                <input type="checkbox" id="allAndNotAll"/>全选/反选
                            </td>
                            <td colspan="6">
                                <button type="button" class="btn  btn-primary scan" id="getValue">
                                    <i class="fa fa-search"></i>扫描选中交换机
                                </button>
                            </td>
                        </tr>
                    {% else %}
                        <tr>
                            <td colspan="7">暂无数据</td>
                        </tr>
                    {% endif %}

                </table>

            </form>

            <!--分页代码已被封装到统一模板文件中-->
        </div>
    </div>
{% endblock %}
{% block js %}
    <script src="{{ buildStaticUrl('/js/swip/index.js') }}"></script>
{% endblock %}